/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hibernate.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ariel
 */
@Embeddable
public class DetallePedProvPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "cod_ped_prov")
    private String codPedProv;
    @Basic(optional = false)
    @Column(name = "linea")
    private String linea;

    public DetallePedProvPK() {
    }

    public DetallePedProvPK(String codPedProv, String linea) {
        this.codPedProv = codPedProv;
        this.linea = linea;
    }

    public String getCodPedProv() {
        return codPedProv;
    }

    public void setCodPedProv(String codPedProv) {
        this.codPedProv = codPedProv;
    }

    public String getLinea() {
        return linea;
    }

    public void setLinea(String linea) {
        this.linea = linea;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codPedProv != null ? codPedProv.hashCode() : 0);
        hash += (linea != null ? linea.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetallePedProvPK)) {
            return false;
        }
        DetallePedProvPK other = (DetallePedProvPK) object;
        if ((this.codPedProv == null && other.codPedProv != null) || (this.codPedProv != null && !this.codPedProv.equals(other.codPedProv))) {
            return false;
        }
        if ((this.linea == null && other.linea != null) || (this.linea != null && !this.linea.equals(other.linea))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "hibernate.entidades.DetallePedProvPK[ codPedProv=" + codPedProv + ", linea=" + linea + " ]";
    }
    
}
